package com.origin.src;

import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

//@Indexed
@Component
@Lazy
@DependsOn("XBeanB")
public class XBeanC {
//        implements FactoryBean<XBeanC> {

    @Autowired
    @Qualifier("xAware")
    BeanFactoryAware xAware;
    @Autowired
    XConfiguration.XBeanB xBeanB;
    @Value("spring.application.name")
    String springApplicationName;

    public XBeanC() {
        System.out.println("XBeanC的构造方法");
    }


    public XBeanC getObject() throws Exception {
        return this;
    }

    public Class<?> getObjectType() {
        return XBeanC.class;
    }
}
